package test;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2023-03-30
 * Time: 16:36
 */
//https://www.nowcoder.com/practice/e2a22f0305eb4f2f9846e7d644dba09b?tpId=37&tqId=21314&ru=/exam/oj
//背包问题
public class Main1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int row = scanner.nextInt();
        int col = scanner.nextInt();
        int[][] dp = new int[row + 1][col + 1];
        for (int i = 1; i < col + 1; i++) {
            dp[0][i] = 1;
        }
        for (int i = 1; i < row + 1; i++) {
            dp[i][0] = 1;
        }
        for (int i = 1; i < row + 1; i++) {
            for (int j = 1; j < col + 1; j++) {
                dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
            }
        }
        System.out.println(dp[row][col]);
    }
}
